﻿<%@ Page Language="C#" MasterPageFile="~/AppSpace/Dashboard.Master" AutoEventWireup="true"
    CodeBehind="MyPage.aspx.cs" Inherits="SmartProject.AppSpace.MyPage" Title="SmartProject - Homepage" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="WebControls/WorkGridView.ascx" TagName="WorkGridView" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <cc1:ModalPopupExtender ID="PopUserMessages" runat="server" PopupControlID="PnlUserMessages"
        CancelControlID="BtnCancel" TargetControlID="BtnViewMessages" BackgroundCssClass="modelBackground">
    </cc1:ModalPopupExtender>
    <div id="PnlUserMessages" runat="server" style="display: none; background-color: #EEE">
        <table cellpadding="0" cellspacing="1" width="600px">
            <tr>
                <td style="color: #EFEFEF; font-weight: bold; font-size: 15px; background-color: #69c;
                    text-align: left;">
                    Your Messages
                </td>
            </tr>
            <tr>
                <td align="left">
                    <asp:ListView ID="LstUserMessages" runat="server">
                        <LayoutTemplate>
                            <asp:DataPager runat="server" ID="DpgUserMessages" PageSize="2">
                                <Fields>
                                    <asp:NumericPagerField ButtonCount="2" PreviousPageText="<--" NextPageText="-->" />
                                </Fields>
                            </asp:DataPager>
                            <table runat="server" id="TblUserMessages" cellpadding="0" cellspacing="1" width="600px">
                                <tr runat="server" id="itemPlaceholder">
                                </tr>
                            </table>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <tr id="Tr2" runat="server">
                                <td align="left">
                                    <div class="clean-gray" style="text-align: left;">
                                        On
                                        <asp:Label ID="LblDueDate" runat="server" Text='<%#Eval("Created") %>'></asp:Label>,
                                        <asp:Label ID="LblOwnerName" runat="server" Text='<%#Eval("OwnerName") %>'></asp:Label>
                                        says:</div>
                                </td>
                            </tr>
                            <tr id="Tr1" runat="server">
                                <td align="left">
                                    <asp:Label ID="LblDescription" runat="server" Text='<%#Eval("Description") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr id="Tr3" runat="server">
                                <td>
                                    <table width="100%">
                                        <tr>
                                            <td align="left">
                                                <asp:LinkButton ID="BtnMarkAsRead" runat="server" CommandArgument='<%#Eval("MessageId") %>'
                                                    OnClick="BtnMarkAsRead_Click">Mark as read</asp:LinkButton>
                                            </td>
                                            <td align="right">
                                                <asp:LinkButton ID="BtnViewWork" runat="server" CommandArgument='<%#Eval("ReferenceObjectId") %>'
                                                    OnClick="BtnView_Click">View work</asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <EmptyDataTemplate>
                            <center>
                                <table cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                        <td>
                                            <asp:Image ID="ImgMessage" runat="server" ImageUrl="~/Image/Desc.png" />
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td align="left" style="color: Blue">
                                            You have no message.
                                        </td>
                                    </tr>
                                </table>
                            </center>
                        </EmptyDataTemplate>
                    </asp:ListView>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:ImageButton ID="BtnCancel" runat="server" ImageUrl="~/Image/WorkCancel2.png"
                        ToolTip="Cancel" />
                </td>
            </tr>
        </table>
    </div>
    <table width="100%">
        <tr>
            <td style="color: Blue">
                <asp:LinkButton ID="BtnViewMessages" runat="server">View my message(s)</asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td style="color: Blue">
                Search:
                <asp:TextBox ID="TxtSearch" runat="server" Width="300px"></asp:TextBox>&nbsp;OR
                <asp:DropDownList ID="DrpViewOptions" runat="server">
                    <asp:ListItem Text="Select one" Value="0" />
                    <asp:ListItem Text="Work items assigned to me" Value="1" />
                    <asp:ListItem Text="Work items I am owner of" Value="2" />
                </asp:DropDownList>
                &nbsp;<asp:ImageButton ID="BtnSearch" runat="server" ImageUrl="~/Image/Search.png"
                    OnClick="BtnSearch_Click" />
            </td>
        </tr>
        <tr>
            <td style="color: Blue">
                <asp:DropDownList ID="DrpOrdering" runat="server">
                    <asp:ListItem Text="Created" Value="0" />
                    <asp:ListItem Text="Priority" Value="1" />
                    <asp:ListItem Text="Due Date" Value="2" />
                </asp:DropDownList>
                <asp:DropDownList ID="DrpDescAsc" runat="server">
                    <asp:ListItem Text="Ascending" Value="0" />
                    <asp:ListItem Text="Descending" Value="1" />
                </asp:DropDownList>
                <asp:CheckBox ID="ChkShowApproved" runat="server" />&nbsp;Also show Approved (Closed)
            </td>
        </tr>
        <tr>
            <td>
                <uc1:WorkGridView ID="WorkGridView1" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>
